import http from "./index";
// 管理员信息
export const getStaff =  (page,size) => {
    return http({
      url: "/admin/selectAll",
      method: "POST",
      params: {
        page,
        size
      }
    });
}
// 添加管理员
export const addStaff =  (admin) => {
  return http({
    url: "/admin/insert",
    method: "POST",
    data: admin
  });
}
// 修改管理员
export const removeStaff =  (cent) => {
  return http({
    url: "/admin/update",
    method: "POST",
    data:cent
  });
}
// 批量删除管理员
export const delStaff =  (ids) => {
  return http({
    url: "/admin/deleteBatch",
    method: "POST",
    params:ids
  
  });
}
// 店铺信息
export const getStore =  () => {
    return http({
      url: "/mall/select",
      method: "POST"
    });
}
// 修改店铺
export const removeStore =  (cent) => {
  return http({
    url: "/mall/update",
    method: "POST",
    data:cent
  });
}

// 权限数据
export const get =  (phone) => {
  return http({
    url: "/admin/selectAllByphone",
    method: "POST",
    params: {
      phone
    }
  });
}
// 上传图片
export const upload =  (file) => {
  return http({
    url: "/upload",
    method: "POST",
    params:{
      file
    }
  });
}
// 获取权限类型
export const identity =  () => {
  return http({
    url: "/admin/identity",
    method: "POST"
  });
}
